package com.example.spring.framework.core;

/**
 * @Classname BeanFactory
 * @Date 2019/4/16 22:46
 * @Author admin
 * @Description TODO
 * <p>
 * 单例工厂的顶层设计
 */
public interface BeanFactory {

    /**
     * 根据beanName从IoC容器中获取一个bean的实例
     *
     * @param beanName
     * @return
     * @throws Exception
     */
    Object getBean(String beanName) throws Exception;

    /**
     * getBean的重载方法，spring中有多个重载方法
     *
     * @param beanClass
     * @return
     * @throws Exception
     */
    Object getBean(Class<?> beanClass) throws Exception;

}
